In some battery-driven devices, an integrated current amount is measured to estimate a remaining amount and a replacement timing of a battery. The integrated current amount indicates how much the battery has consumed current since replaced (or fully charged). The integrated current amount is measured by using a measurement circuit such as a coulomb counter.
To reduce consumption current of the measurement, there is proposed a technique which detects time periods in which a current from a battery to a load has a value greater than a predetermined value, measures an integrated current amount and an internal state of the battery only in the time periods, and stops the measurement in the other time periods.
See, for example, Japanese Laid-open Patent Publication Nos. 2001-118607 and 2007-078443.
By the way, some battery-driven loads have a relatively longer standby time. For example, some sensor devices intermittently operate to save remaining amount of a battery, for acquiring environmental data. In the case where such a load is used, because the integrated current amount in the standby time becomes relatively larger, the above method of measuring the integrated current amount only in the time periods, in which the current from the battery to the load has a greater value, is not able to accurately measure a total integrated-current amount. As countermeasures to this problem, there is conceived another technique in which the measurement circuit is periodically turned on and off; an average current is calculated by using time periods in which the measurement circuit is turned on and an integrated current amount obtained in the time periods; and a total integrated-current amount is calculated, based on an assumption that the average current flows also in time periods in which the measurement circuit is turned off.
However, in a case where operation intervals of a load change while the measurement circuit is turned off (for example, in a case where data-acquisition intervals of a sensor device change in accordance with environmental conditions), a calculated average current becomes different from an actual average current. This causes deterioration of calculation accuracy of the total integrated-current amount.